package cn.soft863.users.service.impl;

import java.util.List;
import java.util.Map;

import cn.soft863.common.util.PageInfoUtil;
import cn.soft863.users.dao.IAAccountDao;
import cn.soft863.users.dao.IABalanceDao;
import cn.soft863.users.dao.IAConsumeHistoryDao;
import cn.soft863.users.dao.IAUsersDao;
import cn.soft863.users.dao.impl.AAccountDaoImpl;
import cn.soft863.users.dao.impl.ABalanceDaoImpl;
import cn.soft863.users.dao.impl.AConsumeHistoryDaoImpl;
import cn.soft863.users.dao.impl.AUsersDaoImpl;
import cn.soft863.users.pojo.AAccount;
import cn.soft863.users.pojo.ABalance;
import cn.soft863.users.pojo.AConsumeHistory;
import cn.soft863.users.pojo.AUsers;
import cn.soft863.users.service.IUsersService;
/**
 * 
 * @author lenovo-yz
 *
 */
public class UsersServiceImpl implements IUsersService
{
	/**
	 * 持有Dao的接口,如何赋值
	 */
	private IAUsersDao usersDao = new AUsersDaoImpl();
	private IAConsumeHistoryDao consumeDao = new AConsumeHistoryDaoImpl();
	private IAAccountDao accountDao = new AAccountDaoImpl();
	private IABalanceDao balanceDao = new ABalanceDaoImpl();
		
	@Override
	public int saveOneUsersService(AUsers users)
	{
		return this.usersDao.saveOneDao(users);
	}

	@Override
	public List<AUsers> findCondListUsersService(PageInfoUtil pageInfoUtil,Map<String, Object> condMap)
	{
		return this.usersDao.findCondListDao(pageInfoUtil,condMap);
	}

	@Override
	public AUsers findOneUsersService(Map<String, Object> condMap)
	{
		return this.usersDao.findOneDao(condMap);
	}

	@Override
	public int updateOneUsersService(AUsers users)
	{
		return this.usersDao.updateOneDao(users);
	}
	
	@Override
	public int saveOneconsumeService(AConsumeHistory consume)
	{
		return this.consumeDao.saveOneDao(consume);
	}

	@Override
	public List<AConsumeHistory> findCondListconsumeService(PageInfoUtil pageInfoUtil,Map<String, Object> condMap)
	{
		return this.consumeDao.findCondListDao(pageInfoUtil,condMap);
	}

	@Override
	public AConsumeHistory findOneconsumeService(Map<String, Object> condMap)
	{
		return this.consumeDao.findOneDao(condMap);
	}

	@Override
	public int updateOneconsumeService(AConsumeHistory consume)
	{
		return this.consumeDao.updateOneDao(consume);
	}
	
	@Override
	public int saveOneAccountService(AAccount account)
	{
		return this.accountDao.saveOneDao(account);
	}

	@Override
	public List<AAccount> findCondListAccountService(PageInfoUtil pageInfoUtil,Map<String, Object> condMap)
	{
		return this.accountDao.findCondListDao(pageInfoUtil,condMap);
	}

	@Override
	public AAccount findOneAccountService(Map<String, Object> condMap)
	{
		return this.accountDao.findOneDao(condMap);
	}

	@Override
	public int updateOneAccountService(AAccount account)
	{
		return this.accountDao.updateOneDao(account);
	}
	
	@Override
	public int saveOneBalanceService(ABalance balance)
	{
		return this.balanceDao.saveOneDao(balance);
	}

	@Override
	public List<ABalance> findCondListBalanceService(PageInfoUtil pageInfoUtil,Map<String, Object> condMap)
	{
		return this.balanceDao.findCondListDao(pageInfoUtil,condMap);
	}

	@Override
	public ABalance findOneBalanceService(Map<String, Object> condMap)
	{
		return this.balanceDao.findOneDao(condMap);
	}

	@Override
	public int updateOneBalanceService(ABalance balance)
	{
		return this.balanceDao.updateOneDao(balance);
	}
}
